package com.indusfo.spc.pojo;

import com.indusfo.spc.common.pojo.BasePojo;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.criteria.CriteriaBuilder;
import java.util.Date;

/**
 * @author chenm
 * @create 2019-07-23 14:04
 */

@Table(name="ba_rule_detail")
public class RuleDetail extends BasePojo {


    @Id
    @Column(name = "rule_detail_id", insertable = false)
    /**
     * @Author 熊冰 //id
     * @Date 2020/1/16 13:15
     */
    private Integer ruleDetailId;
    /**
     * @Author 熊冰 //规则的id
     * @Date 2020/1/16 13:15
     */
    private Integer ruleId;
    /**
     * @Author 熊冰 //规则的名称
     * @Date 2020/1/16 13:15
     */
    private String ruleName;
    /**
     * @Author 熊冰 //序号autoid
     * @Date 2020/1/16 13:16
     */
    private Integer serialNum;
    /**
     * @Author 熊冰 //常量cl
     * @Date 2020/1/16 13:16
     */
    private Integer constant;
    /**
     * @Author 熊冰 //常量名称clName
     * @Date 2020/1/16 13:16
     */
    private String constantName;
    /**
     * @Author 熊冰 //初始值first
     * @Date 2020/1/16 13:16
     */
    private String initialValue;
    /**
     * @Author 熊冰 //类型ID   typeId
     * @Date 2020/1/16 13:16
     */
    private Integer ruleTypeId;

    /**
     * @Author 熊冰 //格式ID  formId
     * @Date 2020/1/16 13:16
     */
    private Integer ruleFormatId;

    /**
     * @Author 熊冰 //长度len
     * @Date 2020/1/16 13:16
     */
    private String charLength;
    /**
     * @Author 熊冰 //步长
     * @Date 2020/1/16 13:17
     */
    private String stepLength;

    /**
     * @Author 熊冰  变量类型
     * @Date 2020/1/16 13:10
     */
    private Integer variateTypeId;
    /**
     * @Author 熊冰  变量格式
     * @Date 2020/1/16 13:10
     */
    private Integer variateFormatId;
    /**
     * @Author 熊冰  常量初始值
     * @Date 2020/1/16 13:10
     */
    private String charValue;
    /**
     * @Author 熊冰 数值初始值
     * @Date 2020/1/16 13:11
     */
    private Integer numValue;
    /**
     * @Author 熊冰  数值长度
     * @Date 2020/1/16 13:11
     */
    private Integer numLength;
    /**
     * @Author 熊冰 数值步长
     * @Date 2020/1/16 13:11
     */
    private Integer numStep;
    /**
     * @Author 熊冰 起始值
     * @Date 2020/1/16 13:11
     */
    private Integer startNum;
    /**
     * @Author 熊冰 结束值
     * @Date 2020/1/16 13:11
     */
    private Integer endNum;
/**
 * @Author 熊冰 //备注
 * @Date 2020/1/16 14:12
 */
    private String remark;

    //1启用，2，停用，3删除
    /**
     * @Author 熊冰 //状态
     * @Date 2020/1/16 14:12
     */
    private Integer dataState;

/**
 * @Author 熊冰 // 创建时间
 * @Date 2020/1/16 14:12
 */
    private Date createDate;
/**
 * @Author 熊冰  // 修改时间
 * @Date 2020/1/16 14:12
 */
    private Date modifyDate;


    /**
     * @Author 熊冰  ---------------------------------以下是数据库没有的字段
     * @Date 2020/1/16 14:13
     */



    /**
     * @Author 熊冰 // 状态名称
     * @Date 2020/1/16 14:12
     */
    private String dataStateName ;
    /**
     * @Author 熊冰 //类型 翻译
     * @Date 2020/1/16 13:16
     */
    private String ruleTypeName;

    /**
     * @Author 熊冰 //格式  翻译
     * @Date 2020/1/16 13:16
     */
    private String ruleFormatName;
    /**
     * @Author 熊冰  变量类型翻译
     * @Date 2020/1/16 14:14
     */
    private String variateTypeName ;
    /**
     * @Author 熊冰  变量格式翻译
     * @Date 2020/1/16 14:15
     */
    private String variateFormatName ;



    public RuleDetail() {
    }

    public RuleDetail(String ruleName,String ruleTypeName, String ruleFormatName,Integer numValue,String charValue, Integer numLength , Integer numStep, String variateFormatName,String variateTypeName, Integer startNum, Integer endNum) {
        //条码规则类别名称
        this.ruleName=ruleName;
        //类型名称
        this.ruleTypeName=ruleTypeName;
        //日期格式名称
        this.ruleFormatName = ruleFormatName;
        //数值初始值
        this.numValue=numValue;
        //常量初始值
        this.charValue=charValue;
        //数值长度
        this.numLength = numLength;
        //数值步长
        this.numStep=numStep;
        //变量参数名称
        this.variateFormatName=variateFormatName;
        //变量格式名称
        this.variateTypeName=variateTypeName;
        //变量起始值
        this.startNum=startNum;
        //变量结束值
        this.endNum=endNum;
    }


    public Integer getRuleDetailId() {
        return ruleDetailId;
    }

    public void setRuleDetailId(Integer ruleDetailId) {
        this.ruleDetailId = ruleDetailId;
    }

    public Integer getRuleId() {
        return ruleId;
    }

    public void setRuleId(Integer ruleId) {
        this.ruleId = ruleId;
    }

    public String getRuleName() {
        return ruleName;
    }

    public void setRuleName(String ruleName) {
        this.ruleName = ruleName;
    }

    public Integer getSerialNum() {
        return serialNum;
    }

    public void setSerialNum(Integer serialNum) {
        this.serialNum = serialNum;
    }

    public Integer getConstant() {
        return constant;
    }

    public void setConstant(Integer constant) {
        this.constant = constant;
    }

    public String getConstantName() {
        return constantName;
    }

    public void setConstantName(String constantName) {
        this.constantName = constantName;
    }

    public String getInitialValue() {
        return initialValue;
    }

    public void setInitialValue(String initialValue) {
        this.initialValue = initialValue== null ? null : initialValue.trim().replace(" ","");
    }

    public Integer getRuleTypeId() {
        return ruleTypeId;
    }

    public void setRuleTypeId(Integer ruleTypeId) {
        this.ruleTypeId = ruleTypeId;
    }

    public Integer getRuleFormatId() {
        return ruleFormatId;
    }

    public void setRuleFormatId(Integer ruleFormatId) {
        this.ruleFormatId = ruleFormatId;
    }

    public String getCharLength() {
        return charLength;
    }

    public void setCharLength(String charLength) {
        this.charLength = charLength== null ? null : charLength.trim().replace(" ","");
    }

    public String getStepLength() {
        return stepLength;
    }

    public void setStepLength(String stepLength) {
        this.stepLength = stepLength== null ? null : stepLength.trim().replace(" ","");
    }

    public Integer getVariateTypeId() {
        return variateTypeId;
    }

    public void setVariateTypeId(Integer variateTypeId) {
        this.variateTypeId = variateTypeId;
    }

    public Integer getVariateFormatId() {
        return variateFormatId;
    }

    public void setVariateFormatId(Integer variateFormatId) {
        this.variateFormatId = variateFormatId;
    }

    public String getCharValue() {
        return charValue;
    }

    public void setCharValue(String charValue) {
        this.charValue = charValue== null ? null : charValue.trim().replace(" ","");
    }

    public Integer getNumValue() {
        return numValue;
    }

    public void setNumValue(Integer numValue) {
        this.numValue = numValue;
    }

    public Integer getNumLength() {
        return numLength;
    }

    public void setNumLength(Integer numLength) {
        this.numLength = numLength;
    }

    public Integer getNumStep() {
        return numStep;
    }

    public void setNumStep(Integer numStep) {
        this.numStep = numStep;
    }

    public Integer getStartNum() {
        return startNum;
    }

    public void setStartNum(Integer startNum) {
        this.startNum = startNum;
    }

    public Integer getEndNum() {
        return endNum;
    }

    public void setEndNum(Integer endNum) {
        this.endNum = endNum;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark== null ? null : remark.trim().replace(" ","");
    }

    public Integer getDataState() {
        return dataState;
    }

    public void setDataState(Integer dataState) {
        this.dataState = dataState;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public String getDataStateName() {
        return dataStateName;
    }

    public void setDataStateName(String dataStateName) {
        this.dataStateName = dataStateName;
    }

    public String getRuleTypeName() {
        return ruleTypeName;
    }

    public void setRuleTypeName(String ruleTypeName) {
        this.ruleTypeName = ruleTypeName;
    }

    public String getRuleFormatName() {
        return ruleFormatName;
    }

    public void setRuleFormatName(String ruleFormatName) {
        this.ruleFormatName = ruleFormatName;
    }

    public String getVariateTypeName() {
        return variateTypeName;
    }

    public void setVariateTypeName(String variateTypeName) {
        this.variateTypeName = variateTypeName;
    }

    public String getVariateFormatName() {
        return variateFormatName;
    }

    public void setVariateFormatName(String variateFormatName) {
        this.variateFormatName = variateFormatName;
    }
}


